package cn.usian.controller;

import cn.usian.mapper.UserMapper;
import cn.usian.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class UserController {
    @Resource
    UserMapper userMapper;

    @GetMapping("/index")
    public String thyme(Model model){
        List<User> all1 = userMapper.findAll();
        model.addAttribute("list",all1);
        return "index";
    }
}
